package com.tsn.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;

import java.io.Serializable;
import java.time.LocalDateTime;

import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * <p>
 * 评论
 * </p>
 *
 * @author tsn
 * @since 2021-08-13
 */
@Data
@EqualsAndHashCode(callSuper = false)
public class Comment implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "Id", type = IdType.AUTO)
    private Integer Id;

    /**
     * 评论人员
     */
    private Integer userId;

    /**
     * 内容
     */
    private String content;

    /**
     * 属于哪种：0为小论坛
     */
    private Integer type;
    /**
     * 父子关系，评论的评论
     */
    private Integer articleId;
    /**
     * 父子关系，评论的评论
     */
    private Integer parentId;

    /**
     * 创建时间
     */
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @TableField(exist = false)
    private String userName;
    @TableField(exist = false)
    private String avatar;
    @TableField(exist = false)
    private Comment comment;



}
